package com.westcom.healthmate.dao;

import com.westcom.healthmate.po.ThirdPartInfoPo;
import com.westcom.healthmate.po.ThridPartInfoMulitPk;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;

@Service
public interface ThirdPartInfoDao extends JpaRepository<ThirdPartInfoPo,ThridPartInfoMulitPk>
{
    @Query("select p from ThirdPartInfoPo p where p.userId=:userId and p.thirdPartName=:thirdPartName")
    ThirdPartInfoPo getInfoByUserIdAndThirdPartName(@Param("userId") long userId,@Param("thirdPartName") String thirdPartName);
}
